public class Car { //封装
    /**
     * 车名
     */
    private String name;

    /**
     * 生产日期   alt+insert
     */
    private String createDate;

    public Car() {

    }

    public Car(String insertName, String insertCreateDate) {
        this.name = insertName;
        this.createDate = insertCreateDate;
    }

    public void run() {
        System.out.println(name + "在跑");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }
}
